package benchmarks.tpch.mongo.domain;

import benchmarks.tpch.utils.Tuple;

import java.util.Date;

public class LineItem extends TPCHDomain<Tuple>{
//    TPCHLoaderMySQL.CastTypes.LONG, // l_orderkey
//    TPCHLoaderMySQL.CastTypes.LONG, // l_partkey
//    TPCHLoaderMySQL.CastTypes.LONG, // l_suppkey
//    TPCHLoaderMySQL.CastTypes.LONG, // l_linenumber
//    TPCHLoaderMySQL.CastTypes.DOUBLE, // l_quantity
//    TPCHLoaderMySQL.CastTypes.DOUBLE, // l_extendedprice
//    TPCHLoaderMySQL.CastTypes.DOUBLE, // l_discount
//    TPCHLoaderMySQL.CastTypes.DOUBLE, // l_tax
//    TPCHLoaderMySQL.CastTypes.STRING, // l_returnflag
//    TPCHLoaderMySQL.CastTypes.STRING, // l_linestatus
//    TPCHLoaderMySQL.CastTypes.DATE, // l_shipdate
//    TPCHLoaderMySQL.CastTypes.DATE, // l_commitdate
//    TPCHLoaderMySQL.CastTypes.DATE, // l_receiptdate
//    TPCHLoaderMySQL.CastTypes.STRING, // l_shipinstruct
//    TPCHLoaderMySQL.CastTypes.STRING, // l_shipmode
//    TPCHLoaderMySQL.CastTypes.STRING  // l_comment
    private int l_orderkey; //1 //primary
    private int l_partkey; //2
    private int l_suppkey; //3
    private int l_linenumber; //4 //primary
    private double l_quantity; //5
    private double l_extendedprice; //6
    private double l_discount; //7
    private double l_tax; //8
    private String l_returnflag; //9
    private String l_linestatus; //10
    private Date l_shipdate; //11
    private Date l_commitdate; //12
    private Date l_receiptdate; //13
    private String l_shipinstruct; //14
    private String l_shipmode; //15
    private String l_comment; //16

    @Override
    public void setInt(int pos, int value) {
        if (pos == 1) {
            l_orderkey = value;
        }
        else if (pos == 2) {
            l_partkey = value;
        }
        else if (pos == 3) {
            l_suppkey = value;
        }
        else if (pos == 4) {
            l_linenumber = value;
        } else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setDouble(int pos, double value) {
        if (pos == 5) {
            l_quantity = value;
        }
        else if (pos == 6) {
            l_extendedprice = value;
        }
        else if (pos == 7) {
            l_discount = value;
        }
        else if (pos == 8) {
            l_tax = value;
        } else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setString(int pos, String value) {
        if (pos == 9) {
            l_returnflag = value;
        }
        else if (pos == 10) {
            l_linestatus = value;
        }
        else if (pos == 14) {
            l_shipinstruct = value;
        }
        else if (pos == 15) {
            l_shipmode = value;
        }
        else if (pos == 16) {
            l_comment = value;
        } else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public void setDate(int pos, Date value) {
        if (pos == 11) {
            l_shipdate = value;
        }
        else if (pos == 12) {
            l_commitdate = value;
        }
        else if (pos == 13) {
            l_receiptdate = value;
        } else {
            System.out.println("Wrong pos");
        }
    }

    @Override
    public Tuple getPrimaryKey() {
        return new Tuple(l_orderkey, l_linenumber);
    }

    public int getL_orderkey() {
        return l_orderkey;
    }

    public void setL_orderkey(int l_orderkey) {
        this.l_orderkey = l_orderkey;
    }

    public int getL_partkey() {
        return l_partkey;
    }

    public void setL_partkey(int l_partkey) {
        this.l_partkey = l_partkey;
    }

    public int getL_suppkey() {
        return l_suppkey;
    }

    public void setL_suppkey(int l_suppkey) {
        this.l_suppkey = l_suppkey;
    }

    public int getL_linenumber() {
        return l_linenumber;
    }

    public void setL_linenumber(int l_linenumber) {
        this.l_linenumber = l_linenumber;
    }

    public double getL_quantity() {
        return l_quantity;
    }

    public void setL_quantity(double l_quantity) {
        this.l_quantity = l_quantity;
    }

    public double getL_extendedprice() {
        return l_extendedprice;
    }

    public void setL_extendedprice(double l_extendedprice) {
        this.l_extendedprice = l_extendedprice;
    }

    public double getL_discount() {
        return l_discount;
    }

    public void setL_discount(double l_discount) {
        this.l_discount = l_discount;
    }

    public double getL_tax() {
        return l_tax;
    }

    public void setL_tax(double l_tax) {
        this.l_tax = l_tax;
    }

    public String getL_returnflag() {
        return l_returnflag;
    }

    public void setL_returnflag(String l_returnflag) {
        this.l_returnflag = l_returnflag;
    }

    public String getL_linestatus() {
        return l_linestatus;
    }

    public void setL_linestatus(String l_linestatus) {
        this.l_linestatus = l_linestatus;
    }

    public Date getL_shipdate() {
        return l_shipdate;
    }

    public void setL_shipdate(Date l_shipdate) {
        this.l_shipdate = l_shipdate;
    }

    public Date getL_commitdate() {
        return l_commitdate;
    }

    public void setL_commitdate(Date l_commitdate) {
        this.l_commitdate = l_commitdate;
    }

    public Date getL_receiptdate() {
        return l_receiptdate;
    }

    public void setL_receiptdate(Date l_receiptdate) {
        this.l_receiptdate = l_receiptdate;
    }

    public String getL_shipinstruct() {
        return l_shipinstruct;
    }

    public void setL_shipinstruct(String l_shipinstruct) {
        this.l_shipinstruct = l_shipinstruct;
    }

    public String getL_shipmode() {
        return l_shipmode;
    }

    public void setL_shipmode(String l_shipmode) {
        this.l_shipmode = l_shipmode;
    }

    public String getL_comment() {
        return l_comment;
    }

    public void setL_comment(String l_comment) {
        this.l_comment = l_comment;
    }
}
